<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:c="http://java.sun.com/jstl/core"
       xmlns:rich="http://richfaces.org/rich"
      >
    <head>
        <p:resources/>
    </head>
    <body>
        <h:form enctype="multipart/form-data">
            <s:fileUpload data="#{fileuploadaction.filewrapper.uploadedFile}" fileName="#{fileuploadaction.filewrapper.fileName}"/>
            <h:commandButton id="attachbtn" action="#{fileuploadaction.upload}" value="Upload"/>

        </h:form>
        <h:form>

            <a4j:poll id="poll" interval="30000" reRender="slideshowpanel"/>
        </h:form>
        <h:form id="slideshowform">
            <rich:panel header="SlideShow" id="slideshowpanel">
                <p:imageSwitch id="imgswitch" effect="FlyIn" speed="2000" slideshowSpeed="6000" rendered="#{not empty pictureaction.images}">
                    <c:forEach var="image" items="#{pictureaction.images}">
                        <p:graphicImage  value="#{image}"/>
                    </c:forEach>
                </p:imageSwitch>
            </rich:panel>
        </h:form>
    </body>
</html>
